#!/bin/bash
sleep 1
echo ""
echo ""
echo "/"
sleep 3
cd /etc/apt
echo "ganti source list ke mirror UI"
mv sources.list sources.list.old
wget http://psm-repository.googlecode.com/files/sources.list
cd /root
pwd
sleep 3
echo ""
echo ""
echo "======"
echo "Update"
echo "======"
echo ""
echo ""
echo Y |  apt-get update
sleep 5
echo ""
echo ""
echo "======="
echo "Upgrade"
echo "======="
echo ""
echo ""
echo Y |  apt-get upgrade
sleep 5
echo ""
echo ""
echo "================="
echo "Install keperluan"
echo "================="
echo Y |  apt-get install sharutils automake1.9 iproute kernel-package libncurses5-dev fakeroot wget bzip2 build-essential debhelper linuxdoc-tools libselinux1-dev bridge-utils$
sleep 3
echo ""
echo "==========================="
echo "check TPROXY kernel support"
echo "==========================="
echo ""
cat /boot/config-`uname -r` | grep -E '(NF_CONNTRACK=|TPROXY|XT_MATCH_SOCKET|XT_TARGET_T PROXY)'
echo ""
echo ""
sleep 5
modprobe xt_TPROXY
modprobe xt_socket
modprobe nf_tproxy_core
modprobe xt_mark
modprobe nf_nat
modprobe nf_conntrack_ipv4
modprobe nf_conntrack
modprobe nf_defrag_ipv4
modprobe ipt_REDIRECT
modprobe iptable_nat
echo ""
echo "==========================="
echo "check TPROXY kernel support"
echo "==========================="
dmesg | grep PROXY
echo ""
echo ""
sleep 5
wget 



